package com.scs.application.core.entity;

import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description： 树对象
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TreeEntity extends DataEntity {

    @EntityFieldAnnotation(
            type = EntityFieldType.LONG,
            default_value = "0"
    )
    public String parentId;


    @EntityFieldAnnotation(
            type = EntityFieldType.STRING,
            length = "30"
    )
    public String nodeKey;

    @EntityFieldAnnotation(
            type = EntityFieldType.INT,
            not_null = true,
            default_value = "0"
    )
    public Integer childCount;

}
